{% comment %}
/* Copyright 2009 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
{% endcomment %}
{% extends 'base.html' %}
{% block content %}
  <div id="edit-message">
  {% if confirmation %}
  <div class="success">Update Completed!</div>
  {% else %}
  &nbsp;
  {% endif %}
  </div>
  <form method="POST">
      <input type="hidden" name="blog" value="{{blog.key}}">
      <table class="table-list">
        <tr>
			<td colspan="2"><h2>General Site Settings</h2></td>
		</tr>
		<tr>
          <td class="table-input-label">
            Site Name*:
            {% if warnings.name %}<br>
            <span class="warning">Your name should be a string.</span>
            {% endif %}
          </td>
          <td>
            <input
              class="text-input"
              type="text"
              name="name"
              value="{{blog.name}}">
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Tagline:
            {% if warnings.tagline %}<br>
            <span class="warning">Your Tagline should be a string.</span>
            {% endif %}
          </td>
          <td>
            <input
              class="text-input"
              type="text"
              name="tagline"
              value="{{blog.tagline}}">
          </td>
        </tr>

        <tr>
          <td class="table-input-label">
            Links Title*:
            {% if warnings.link_title %}<br>
            <span class="warning">Your button name should be a string.</span>
            {% endif %}
          </td>
          <td>
            <input
              class="text-input"
              type="text"
              name="link_title"
              value="{{blog.link_title}}"> 
              (title for the links section)
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Template*:
            {% if warnings.template %}<br>
            <span class="warning">A template is required.</span>
            {% endif %}
          </td>
          <td>
            <input
              class="text-input"
              type="text"
              name="template"
              value="{{blog.template}}">
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Canonical Url:
            {% if warnings.canonical %}<br>
            <span class="warning">Your canonical url should be a string.</span>
            {% endif %}
          </td>
          <td>
            <input
              class="text-input"
              type="text"
              name="canonical"
              value="{{blog.canonical|default_if_none:""}}"> (optional)
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Logo Path:
            {% if warnings.logo_path %}<br>
            <span class="warning">Your path should be a string.</span>
            {% endif %}
          </td>
          <td>
            <input
              class="text-input"
              type="text"
              name="logo_path"
              value="{{blog.logo_path}}">
            (relative to the /images in the root directory)
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Favicon Path:
            {% if warnings.favicon_path %}<br>
            <span class="warning">Your path should be a string.</span>
            {% endif %}
          </td>
          <td>
            <input
              class="text-input"
              type="text"
              name="favicon_path"
              value="{{blog.favicon_path}}">
            (relative to the /images in the root directory)
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Enable Page Info:
            {% if warnings.enable_pageinfo %}<br>
            <span class="warning">Your managed to mess up checking an unrequired
              checkbox. How'd you do that?</span>
            {% endif %}
          </td>
          <td>
            <input
              type="checkbox"
              class="warning"
              name="enable_pageinfo"
              {% if blog.enable_pageinfo %}
              checked="true"
              {% endif %}
              value="true">
            (turns on summary info about pages)
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Keywords:
            {% if warnings.keywords %}<br>
            <span class="warning">Your keywords should be a comma separated
              string.</span>
            {% endif %}
          </td>
          <td>
            <textarea
              class="textarea-small"
              name="keywords">{{blog.keywords}}</textarea>
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Description:
            {% if warnings.description %}<br>
            <span class="warning">Your description should be a string.</span>
            {% endif %}
          </td>
          <td>
            <textarea
              class="textarea-med"
              name="description">{{blog.description}}</textarea>
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Google CSE box:
            {% if warnings.google_cse_box %}<br>
            <span class="warning">This should be an HTML form.</span>
            {% endif %}
          </td>
          <td>
            <textarea
              class="textarea-med"
              name="google_cse_box">{{blog.google_cse_box}}</textarea> 
              <div>Sign up at <a href="http://www.google.com/cse/" target="_blank">http://www.google.com/cse/</a> to get your own Google Custom Search Engine. Results page handing already built in.</div>
          </td>
        </tr>
		<tr>
			<td colspan="2"><h2>Blog Settings</h2></td>
		</tr>
        <tr>
          <td class="table-input-label">
            Button Name*:
            {% if warnings.button_name %}<br>
            <span class="warning">Your button name should be a string.</span>
            {% endif %}
          </td>
          <td>
            <input
              class="text-input"
              type="text"
              name="button_name"
              value="{{blog.button_name}}">
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Posts Per Page:
            {% if warnings.posts_per_page %}<br>
            <span class="warning">Please enter an integer.</span>
            {% endif %}
          </td>
          <td>
            <input
              type="text"
              name="posts_per_page"
              value="{{blog.posts_per_page}}">
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Enable Comments:
            {% if warnings.enable_comments %}<br>
            <span class="warning">Your managed to mess up checking an unrequired
              checkbox. How'd you do that?</span>
            {% endif %}
          </td>
          <td>
            <input
              type="checkbox"
              class="warning"
              name="enable_comments"
              {% if blog.enable_comments %}
              checked="true"
              {% endif %}
              value="true">
            (turns on login links and native commenting)
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Enable Post Info:
            {% if warnings.enable_postinfo %}<br>
            <span class="warning">Your managed to mess up checking an unrequired
              checkbox. How'd you do that?</span>
            {% endif %}
          </td>
          <td>
            <input
              type="checkbox"
              class="warning"
              name="enable_postinfo"
              {% if blog.enable_postinfo %}
              checked="true"
              {% endif %}
              value="true">
            (turns on summary info about posts)
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            Display Partial Posts:
            {% if warnings.partial_posts %}<br>
            <span class="warning">Your managed to mess up checking an unrequired
              checkbox. How'd you do that?</span>
            {% endif %}
          </td>
          <td>
            <input
              type="checkbox"
              name="partial_posts"
              {% if blog.partial_posts %}
              checked="true"
              {% endif %}
              value="true">
          </td>
        </tr>

        <tr>
          <td class="table-input-label">
            NoIndex:
            {% if warnings.noindex %}<br>
            <span class="warning">Your managed to mess up checking an unrequired
              checkbox. How'd you do that?</span>
            {% endif %}
          </td>
          <td>
            <input
              type="checkbox"
              name="noindex"
              {% if blog.noindex %}
              checked="true"
              {% endif %}
              value="true">
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            NoFollow:
            {% if warnings.nofollow %}<br>
            <span class="warning">Your managed to mess up checking an unrequired
              checkbox. How'd you do that?</span>
            {% endif %}
          </td>
          <td>
            <input
              type="checkbox"
              name="nofollow"
              {% if blog.nofollow %}
              checked="true"
              {% endif %}
              value="true">
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            NoArchive:
            {% if warnings.noarchive %}<br>
            <span class="warning">Your managed to mess up checking an unrequired
              checkbox. How'd you do that?</span>
            {% endif %}
          </td>
          <td>
            <input
              type="checkbox"
              name="noarchive"
              {% if blog.noarchive %}
              checked="true"
              {% endif %}
              value="true">
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            NoSnippet:
            {% if warnings.nosnippet %}<br>
              <span class="warning">How do you mess up checking a box?</span>
            {% endif %}
          </td>
          <td class="table-input">
            <input type="checkbox" name="nosnippet" value="true"
              {% if blog.nosnippet %} checked="true" {% endif %}>
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            NoODP:
            {% if warnings.noodp %}<br>
            <span class="warning">Your managed to mess up checking an unrequired
              checkbox. How'd you do that?</span>
            {% endif %}
          </td>
          <td>
            <input
              type="checkbox"
              class="warning"
              name="noodp"
              {% if blog.noodp %}
              checked="true"
              {% endif %}
              value="true">
          </td>
        </tr>
        <tr>
          <td class="table-input-label">
            <input type="submit" name="save" value="Save">
          </td>
          <td class="table-input">
            <span class="required">* Required</span>
            <input type="submit" name="done" value="Done">
            <input type="submit" name="cone" value="Cancel">
          </td>
        </tr>
      </table>
    </form>
{% endblock %}
